package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/11/19 09:06
 **/
public class Day75_1_Num1732_LargestAltitude {
    class Solution {
        public int largestAltitude(int[] gain) {
            int maxHe = 0;
            int height = 0;
            for(int i : gain) {
                height += i;
                maxHe = Math.max(maxHe, height);
            }
            return maxHe;
        }
    }
}